#include <stdio.h>
#include <stdlib.h>
void main()
{
    FILE *fp;
    int i = 0;
    char *str[] = {"visual C++", "visual Basic", "visual java", "visual foxpro"};
    if ((fopen("data3.txt", "w")) == NULL)
    {
        printf("%s open error!\n", "data3.txt");
        exit(1);
    }
    while (i < 4)
    {
        fprintf(fp, "%s\n", str[i]);
        i++;
    }
    fclose(fp);
}